package com.managerConsummer.service;

import entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * The interface User service feign.
 *
 * @author overlook
 * @date 2022 -04-16 20:33:46
 */
@FeignClient(name = "mp-p")
public interface UserServiceFeign {
    /**
     * Find all user string.
     *
     * @param user the user
     * @return the string
     */
    @RequestMapping("/user/findAllUser")
    @ResponseBody
    String findAllUser(@RequestBody User user);

    /**
     * Insert user string.
     *
     * @param user the user
     * @return the string
     */
    @RequestMapping("/user/insertUser")
    @ResponseBody
    String insertUser(@RequestBody User user);

    /**
     * Update user string.
     *
     * @param user the user
     * @return the string
     */
    @RequestMapping("/user/updateUser")
    @ResponseBody
    String updateUser(@RequestBody User user);

    /**
     * Delete by id string.
     *
     * @param id the id
     * @return the string
     */
    @RequestMapping("/user/deleteById/{id}")
    @ResponseBody
    String deleteById(@PathVariable("id") String id);

    /**
     * Select one user string.
     *
     * @param user the user
     * @return the string
     */
    @RequestMapping("/user/selectOneUser")
    @ResponseBody
    String selectOneUser(@RequestBody User user);


    /**
     * Select one user role power string.
     *
     * @param user the user
     * @return the string
     */
    @RequestMapping("/user/selectOneUserRolePower")
    @ResponseBody
    String selectOneUserRolePower(@RequestBody User user);

}
